function [outputArg1,outputArg2] = plot_ttest(h, time, ylim, color_mesh)
range = [];
if h(1) == 1
    range(1,1) = 1;
end

for m = 1:length(h)-1
    if h(m) == 0 && h(m+1) == 1
        range(size(range,1)+1,1) = m+1;
    end
    
    if h(m) == 1 && h(m+1) == 0
        range(size(range,1),2) = m;
    end
end

if h(end) == 1
    range(size(range,1),2) = length(h);
end
for m = 1:size(range,1)
    x_1 = time(range(m,1));
    x_2 = time(range(m,2));
    y_1 = ylim(1);
    y_2 = ylim(2);
    mesh = fill([x_1 x_1 x_2 x_2],[y_1 y_2 y_2 y_1], color_mesh, 'EdgeColor', 'none', 'FaceAlpha', 0.5);
end
end

